import { createApp } from 'vue'
import App from './App.vue'
// import router,{addDynamicRoutes} from "./router/router";
import router from "./router/router";
import i18n from './i18n';
// import { createPinia } from 'pinia';
import store from "./store/index"

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './assets/iconfont.css'
import "./style/base.css"

import rejectDirective from "./directive/directive"
import rejectComponent from "./globalComponent/globalComponent"
// const pinia = createPinia();
const app = createApp(App);
app.use(i18n)
app.use(router)
// 动态加载路由
// addDynamicRoutes()
app.use(ElementPlus)
const pinia = store(app)
app.use(pinia)
rejectDirective(app)
rejectComponent(app)
app.mount('#app')

export {pinia}
